/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.gc.cscott.fs;

import java.io.File;

/**
 *
 * @author root
 */
public class LayoutTool {

    static final boolean moveFiles = false;

    public static void main(String[] args) {
        for (File userDir : new File("D:/temp/cscott-pack/sources/vsu2").listFiles()) {
            for (File subDir : userDir.listFiles()) {
                if (subDir.isDirectory()) {
                    for (File nestedDir : subDir.listFiles()) {
                        if (nestedDir.isDirectory()) {
                            if (nestedDir.getName().toLowerCase().startsWith("z")) {
                                File targetName = new File(userDir, nestedDir.getName());
                                System.out.println("Rename " + nestedDir.getAbsolutePath() + " to " + targetName.getAbsolutePath());
                                if (moveFiles) {
                                    nestedDir.renameTo(targetName);
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
